<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/include.inc.jsp" %>

<!--查询条件-->
<el-form :inline="true" :model="form" size="small">
    <c:forEach items="${listControl}" var="con">
        <c:if test="${not empty con.controlName}">
            <el-form-item label="${con.controlName}">
                <label class="mtlabel-auto">${con.controlName}：</label>
                <c:choose>
                    <c:when test="${con.controlType == 0}">
                        <input type="text" class="mtinput" name="${con.fieldName}"
                        <%--                               controltype="${con.controlType}"
                                                       value="${con.qcDefault}"/>--%>
                        <el-input v-model="form.${con.fieldName}" placeholder="工号"></el-input>
                    </c:when>
                    <c:when test="${con.controlType == 1}">
                        <el-input v-model="form.${con.fieldName}" placeholder="工号"></el-input>
                    </c:when>
                </c:choose>
            </el-form-item>
        </c:if>
    </c:forEach>

    <el-form-item>
        <el-button type="primary" @click="search">查询</el-button>
    </el-form-item>
</el-form>
<hr/>
<!--数据-->
<el-table
        :data="grid.data"
        :height="grid.height">
    <el-table-column prop="name" label="操作" width="100">
        <template slot-scope="scope">
            <a @click="goview(scope.row.id)" class="grid-operate">查看</a>
            <a @click="goedit(scope.row.id)" class="grid-operate">编辑</a>
        </template>
    </el-table-column>
    <c:forEach items="${listControl}" var="con">
        <el-table-column prop="${con.field}" label="${con.title}"
            ${con.ifDisplay == 0?'width="0"':''}></el-table-column>
    </c:forEach>
</el-table>
